package com.baizhi.entity;

import java.io.Serializable;
//对应First连接中的second数据库中的t_user表   实现序列化接口才能将该类的对象进行序列化
public class User implements Serializable {
    private Integer id;
    private String name;
    private String password;
    private Integer isadmin;//0代表是管理员 1代表普通用户

    public User() {
    }

    public User(Integer id, String name, String password, Integer isadmin) {
        this.id = id;
        this.name = name;
        this.password = password;
        this.isadmin = isadmin;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getIsadmin() {
        return isadmin;
    }

    public void setIsadmin(Integer isadmin) {
        this.isadmin = isadmin;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", isadmin=" + isadmin +
                '}';
    }
}
